Computer-Aided Design of User Interfaces VI by Víctor López-Jaquero Francisco Montero José Pascual Molina & Jean Vanderdonckt

Computer-Aided Design of User Interfaces VI by Víctor López-Jaquero Francisco Montero José Pascual Molina & Jean Vanderdonckt

Author:Víctor López-Jaquero, Francisco Montero, José Pascual Molina & Jean Vanderdonckt
Language: eng
Format: epub
Publisher: Springer London, London


14.6 Using the EMF and Diamodl Tools Together

In this section, we will outline how the EMF and Diamodl tools are used together in practice.

It is often a matter of taste whether domain modeling is done before, during, or after dialog modeling. Fairly often, we model user interfaces for existing systems, and in such cases it is natural to develop the domain model first. EMF provides both tree-based and diagram-based editing of Ecore models, as shown in Fig. 14.3. In the initial development of the model, we prefer the diagram editor, but we find ourselves using the tree-based for details and annotations (used for scripting operations) as it is more responsive and has complete coverage of the Ecore language. Once a domain model is available, we can start referring to domain concepts in the Diamodl model, for example, define variables with type information and computations that access attributes and associations. If a concept name is used but missing, the Diamodl editor will insert problem markers. The editor includes actions for opening the domain model, so it is easy to add missing concepts to the domain model.

The editor has a palette of pre-defined model fragments to make modeling quicker, both abstract interactors and interactors containing references to a library of concrete user interface elements. To test a dialog, a runtime is launched, and all the concrete user interface elements are assembled into an XSWT file and rendered in a view in the Workbench, in a separate frame or inside the editor. Currently, layout information must be included by hand, by editing the XSWT file.

A qualitative evaluation of the user interface is possible without actual domain data, but little of the behavior may be tested without actual data to interact with and operate on. The Ecore editor includes an action for instantiating the model. EMF requires that a single object be the root of an instance tree, so an appropriate class must exist and be selected when creating the data file. A complete graph of Ecore instances may then be created using the reflective data editor, as shown in Fig. 14.4. Since the XML serialization format is based on the open XMI standard, it is straight-forward to export data from existing sources, using appropriate queries and transformations.

Once the example data are in place, they may be loaded by the runtime and utilized by the model elements. For example, each variable in the model has an enter action, that is executed when that part of the model is activated as a state. To initialize the variable with data from the data file, you will usually write a simple Javascript expression that navigates from the root instance to the desired data. A special action is provided for the common case where a variable is initialized to all the instances of a certain class.

The initialization of the variables will trigger the dataflow machinery and the user interface prototype will become alive, as the user interface elements are populated with data. The end-user may then start interacting with the prototype and cause values to flow according to the modeled behavior.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.